package com.shangyueshang.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @author: JokeyZheng
 * @email: zhengjingfeng@ruqimobility.com
 * @created: 2022/2/22 15:28
 * @version: v1.0.0
 */
@Data
public class ShippingDTO {

    /**
     * SKU
     */
    @NotBlank(message = "缺少sku参数")
    private String sku;

    /**
     * 产品名称
     */
    private String productName;

    /**
     * 所属店铺
     */
    private String shop;

    /**
     * 渠道
     */
    @NotBlank(message = "缺少channel参数")
    private String channel;

    /**
     * 运输状态，默认：待取货(wait_pick)
     */
    private String shipStatus;

    /**
     * 发货日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate shipDate;

    /**
     * 签收日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate receiptDate;

    /**
     * FBA货件号
     */
    private String fbaShipmentNo;

    /**
     * 货代运单号
     */
    private String waybillNo;

    /**
     * 产品数量
     */
    @Min(value = 1)
    @NotNull(message = "缺少productQuantity参数")
    private Integer productQuantity;

    /**
     * 货件数（箱）
     */
    @Min(value = 1)
    @NotNull(message = "缺少shipQuantity参数")
    private Integer shipQuantity;

    /**
     * 货运代理ID
     */
    @NotNull(message = "缺少freightForwarderId参数")
    private Long freightForwarderId;

    /**
     * 自称重量，单位：kg
     */
    @NotNull(message = "缺少selfWeight参数")
    private BigDecimal selfWeight;

    /**
     * 计费重量，单位：kg
     */
    @NotNull(message = "缺少chargeWeight参数")
    private BigDecimal chargeWeight;

    /**
     * 运输费用，单位：元
     */
    private BigDecimal shipFee;

    /**
     * 运输单价，单位：元/kg
     */
    @NotNull(message = "缺少shipUnitPrice参数")
    private BigDecimal shipUnitPrice;

    /**
     * 付款状态，1-已付款 0-未付
     */
    private Integer payStatus;
}
